// Sass Mixins
// Shared between Habitat web properties

// Boxes and shadows
@mixin shadow-float {
  box-shadow: 0 2px 14px 0 $medium-gray-20;
}

@mixin shadow-float-more {
  box-shadow: 0 2px 20px 0 $medium-gray-40;
}

@mixin dropdown-panel {
  @include shadow-float-more;
  background-color: $white;
  border-radius: $global-radius;
  height: auto;
  padding: rem(15);
  width: auto;
}

// Buttons
@mixin hab-button ($color1: $hab-green, $color2: $hab-green-dark, $textcolor: $hab-white) {
  background-color: $color1;
  background-image: linear-gradient(to left, lighten($color1, 5%), lighten($color2, 3%) 100%);
  border: 0;
  border-radius: 7px;
  color: $textcolor;
  font-size: rem-calc(16);
  letter-spacing: rem-calc(1);
  padding: rem(10) rem(25);

  &:hover {
    @include shadow-float-more;
    @include transition(all 0.2s ease-in-out);
    background-color: $color1;
  }
}

@mixin primary-button($color1: $hab-orange, $color2: $hab-orange-dark) {
  @include hab-button;
  @include shadow-float;
  @include transition(all 0.2s ease-in-out);
  background-color: $color1;
  background-image: linear-gradient(to left, lighten($color1, 13%), lighten($color2, 5%) 100%);
  text-shadow: 0 1px 2px $hab-red;
}

@mixin secondary-button {
  @include hab-button($hab-orange-dark);
  background-color: transparent;
}

@mixin cta-button {
  @include primary-button($hab-orange, $hab-orange-dark);
}

// ------------------------------------------------------------
// Omega Reset (http://www.joshfry.me/blog/2013/05/13/omega-reset-for-bourbon-neat)
// ------------------------------------------------------------

@mixin omega-reset($nth, $columns: 12) {
  &:nth-child(#{$nth}) { margin-right: flex-gutter($columns); }
  &:nth-child(#{$nth}+1) { clear: none; }
}
